<?php

namespace Settings\Model;

use Zend\Db\TableGateway\TableGateway;
use Zend\Db\Sql\Sql;
use Zend\Db\Sql\Select;
use Zend\Db\Sql\Where;

class SettingsTable {

    protected $tableGateway;

    public function __construct(TableGateway $tableGateway) {
        $this->tableGateway = $tableGateway;
    }

    public function getTableGateway() {
        return $this->tableGateway;
    }

    public function setTableGateway($tableGateway) {
        $this->tableGateway = $tableGateway;
    }

    public function getSitename() {
//        $select = new Select();
//        $where = new Where();
//        
//        $where->equalTo('name', 'site_name');
//        $select->from('variable')->column(array('value'))->where($where);
//        
//        return $this->tableGateway->selectWith($select)->toArray();
//        $resultset = $this->tableGateway->select();
//        return $resultset;
        return array();
    }

    public function getLogoname() {
//        $select = new Select();
//        $where = new Where();
//        
//        $where->equalTo('name', 'logo_name');
//        $select->from('variable')->columns(array('value'))->where($where);
//        
//        return $this->tableGateway->selectWith($select)->toArray();
    }

    public function saveSitename() {
        
    }

    public function saveLogonname() {
        
    }

}